import request from '@/utils/request'

// 用水计量管理信息-列表查询
const waterUseMeasurementList = function (params = {}) {
  return request({
    url: '/zy-api/api/water/getWaterConsumptionList',
    method: 'post',
    data: params
  })
}

// 查询所在水资源分区 选项
const waterResourceList = function (params = {}) {
  return request({
    url: '/zy-api/api/water/getWaterResourceList',
    method: 'post',
    data: params
  })
}

// 根据ID查询-用水计量管理信息
const waterUseMeasurementDetails = function (mfcode) {
  return request({
    url: '/zy-api/api/water/getWaterConsumptionId',
    method: 'post',
    data: { mfcode }
  })
}

// 用水计量管理基本信息-新增
const addWaterUseMeasurementInfo = function (params = {}) {
  return request({
    url: '/zy-api/api/water/addWaterConsumption',
    method: 'post',
    data: params
  })
}

// 用水计量管理基本信息-修改
const editWaterUseMeasurementInfo = function (params = {}) {
  return request({
    url: '/zy-api/api/water/updWaterConsumption',
    method: 'post',
    data: params
  })
}

// 用水计量管理基本信息-删除
const delWaterUseMeasurementInfo = function (params = {}) {
  return request({
    url: '/zy-api/api/water/delWaterConsumption',
    method: 'post',
    data: params
  })
}

// 运行记录-列表
const runRecordList = function (params = {}) {
  return request({
    url: '/zy-api/api/facility/getFacilityMeasureList',
    method: 'post',
    data: params
  })
}

// 运行记录-新增
const addRunRecord = function (params = {}) {
  return request({
    url: '/zy-api/api/facility/addFacilityMeasure',
    method: 'post',
    data: params
  })
}

// 运行记录-编辑
const editRunRecord = function (params = {}) {
  return request({
    url: '/zy-api/api/facility/updFacilityMeasure',
    method: 'post',
    data: params
  })
}

// 运行记录-删除
const delRunRecord = function (params = {}) {
  return request({
    url: '/zy-api/api/facility/delFacilityMeasure',
    method: 'post',
    data: params
  })
}

export {
  waterUseMeasurementList,
  waterResourceList,
  waterUseMeasurementDetails,
  addWaterUseMeasurementInfo,
  editWaterUseMeasurementInfo,
  delWaterUseMeasurementInfo,
  runRecordList,
  addRunRecord,
  editRunRecord,
  delRunRecord,
}